<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:rich="http://richfaces.org/rich"
	xmlns:a4j="http://richfaces.org/a4j">

<ui:composition>
	<h:head>
		<meta http-equiv="Content-Type"
			content="text/html; charset=ISO-8859-1" />
		<link type="text/css" rel="stylesheet" href="css/myform.css" />
		<title>Rede de Imóveis</title>
	</h:head>
	
	<f:view>
		<f:loadBundle basename="br.com.imob.properties.messages" var="labels" />
		
		<div id="header">
						
			<!-- MENU -->
			
			<ui:insert name="menu">
				<ui:include src="/paginas/menu.xhtml" />
			</ui:insert>
			
			<br style="clear: left" />
		</div>
		
		<h:form id="FormPesquisa">
			<rich:tabPanel id="panelDadosPesquisa">
				<rich:tab id="tabDadosPesquisa">
					<f:facet name="header">
                		<h:outputText value="Busca" />
            		</f:facet>
            		<h:panelGrid id="gridDadosTipoImovel" columns="3">
            			<h:outputText value="#{labels.tipoImovel}: "></h:outputText>
						<h:inputText id="tipoImovel" value="#{tipoImovelSisBO.tipoImovelBusca}"></h:inputText>
						<h:commandButton action="#{tipoImovelSisBO.pesquisar}" value="#{labels.buscar}"></h:commandButton>				
	    			</h:panelGrid>
	    			
	    			<br style="clear: left" />
	    			
	    			<rich:dataTable id="lista" value="#{tipoImovelSisBO.dadosPesquisa}" var="item" rows="3" columns="2" rendered="#{not empty tipoImovelSisBO.dadosPesquisa}">
						<h:column>
							<f:facet name="header">
								<h:outputText value="#{labels.descricao}"></h:outputText>
							</f:facet>
							<h:outputText value="#{item.tipoImovel}" ></h:outputText>
						</h:column>
						<h:column>
							<f:facet name="header">
                    			<h:outputText value="Editar e Excluir"/>
                    		</f:facet>
                    		&nbsp;&nbsp;								
							<h:commandLink action="#{tipoImovelSisBO.exibirAlteracao}" title="Alterar" immediate="true">
								<h:graphicImage value="/resources/icones/alterar.png" />
								<f:setPropertyActionListener value="#{item}" target="#{tipoImovelSisBO.dadosForm}"/>					
							</h:commandLink>
							&nbsp;&nbsp;
							<h:commandLink value="" action="#{tipoImovelSisBO.exibirExclusao}"  title="Excluir" immediate="true">
								<h:graphicImage value="/resources/icones/excluir.png" />
								<f:setPropertyActionListener value="#{item}" target="#{tipoImovelSisBO.dadosForm}"/>					
							</h:commandLink>
						</h:column>
						<f:facet name="footer">                 			
                			<rich:dataScroller for="lista" pageIndexVar="pageIndex" pagesVar="pages">  
	                    		<f:facet name="pages">  
	               	    			<h:outputText value="#{pageIndex}/#{pages}"/>  
	               				</f:facet>  
                			</rich:dataScroller>
                		</f:facet>
					</rich:dataTable>
	    		</rich:tab>
			</rich:tabPanel>
			<h:commandButton action="#{tipoImovelSisBO.exibirInclusao}" value="#{labels.incluir}" ></h:commandButton>
		</h:form>
		<rich:messages errorClass="error" infoClass="success" warnClass="alert"></rich:messages>
		
	</f:view>
</ui:composition>
</html>